<template>
  <ul class="notice-list">
    <li v-for="(item , index) in NoticeList" :key="index">
      <div class="time-box">
        <i>{{item.date}}</i>
        <span>{{item.years}}</span>
      </div>
      <div class="main-box">
        <div class="announcement-title">
          <p class="only-1">{{item.title}}</p>
          <span>
            <Icon type="ios-eye-outline" />
            {{item.reading}}
          </span>
        </div>
        <div class="announcement-content multi-line">{{item.content}}</div>
      </div>
    </li>
  </ul>
</template>

<script>
// 框架组件
import { Icon } from "view-design";
export default {
    name:'NoticeList',
    components:{
        Icon
    },
    props:{
        NoticeList:Array,
    }
};
</script>

<style lang="scss" scoped>
.notice-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 590px;
    height: 116px;
    padding: 16px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 1);
    &:first-child {
      .time-box {
        background-color: #0086e4;
      }
    }
    .time-box {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      min-width: 84px;
      height: 84px;
      margin-right: 10px;
      background-color: #e5b87f;
      color: #fff;
      font-size: 16px;
      i {
        font-size: 22px;
      }
    }
    .main-box {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 84px;
      .announcement-title {
        display: flex;
        justify-content: space-between;
        p {
          max-width: 400px;
          font-size: 16px;
          font-weight: bold;
        }
        span {
          font-size: 12px;
          color: #999;
          i {
            font-size: 18px;
          }
        }
      }
      .announcement-content {
        font-size: 14px;
        color: #999;
        line-height: 1.6;
      }
    }
  }
}
</style>